//
//  TwoCell.m
//  WE
//
//  Created by 要帅气的生活 on 15/11/18.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "TwoCell.h"
#import "Size.h"

@interface TwoCell ()

@property (nonatomic,strong) UILabel *tuandui;
@property (nonatomic,strong) UILabel *shuliang;
@property (nonatomic,strong) UILabel *shanchang;
@property (nonatomic,strong) UILabel *tuandui2;
@property (nonatomic,strong) UILabel *shuliang2;
@property (nonatomic,strong) UILabel *shanchang2;

@end

@implementation TwoCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _left = [[BaseView alloc] init];
        [self.contentView addSubview:_left];
        _imgleft = [UIImageView new];
        [_left addSubview:_imgleft];
        _nameleft = [UILabel new];
        [_left addSubview:_nameleft];
        _tuandui = [UILabel new];
        [_left addSubview:_tuandui];
        _shuliang = [UILabel new];
        [_left addSubview:_shuliang];
        _shanchang = [UILabel new];
        [_left addSubview:_shanchang];
        _labelleft = [UILabel new];
        [_left addSubview:_labelleft];
        _geshuleft = [UILabel new];
        [_left addSubview:_geshuleft];
        
        _right = [[BaseView alloc] init];
        [self.contentView addSubview:_right];
        _imgright = [UIImageView new];
        [_right addSubview:_imgright];
        _nameright = [UILabel new];
        [_right addSubview:_nameright];
        _tuandui2 = [UILabel new];
        [_right addSubview:_tuandui2];
        _shuliang2 = [UILabel new];
        [_right addSubview:_shuliang2];
        _shanchang2 = [UILabel new];
        [_right addSubview:_shanchang2];
        _labelright = [UILabel new];
        [_right addSubview:_labelright];
        _geshuright = [UILabel new];
        [_right addSubview:_geshuright];
    }
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    _left.frame = CGRectMake(10*Width, 10*Width, self.frame.size.width/2-13*Width, self.frame.size.height-20*Height);
    _left.layer.borderWidth = 1;
    _left.layer.borderColor = Colorthree.CGColor;
    _left.layer.cornerRadius = 4;
    _imgleft.frame = CGRectMake(5*Width, 5*Width, _left.frame.size.width/4-5*Width, _left.frame.size.height/2);
    _imgleft.backgroundColor = DEBUG_CLOLR;
    _nameleft.frame = CGRectMake(_left.frame.size.width/4+5*Width, 5*Width, _left.frame.size.width/4+10*Width, _left.frame.size.height/4-2.5*Height);
    _nameleft.font = [UIFont systemFontOfSize:14];
    _nameleft.textAlignment = 0;
    _tuandui.frame = CGRectMake(_left.frame.size.width/2+12*Width, 5*Width, _left.frame.size.width/2, _left.frame.size.height/4-2.5*Width);
    _tuandui.text = @"专家团队";
    _tuandui.font = [UIFont systemFontOfSize:12];
    _tuandui.alpha = 0.7;
    _tuandui.textAlignment = 0;
    
    _shuliang.frame = CGRectMake(_left.frame.size.width/4+5*Width, _left.frame.size.height/4+10*Width, _left.frame.size.width/2, _left.frame.size.height/4-2.5*Height);
    _shuliang.textAlignment = 0;
    _shuliang.text = @"对症预约数量:";
    _shuliang.alpha = 0.7;
    //_shuliang.font = [UIFont systemFontOfSize:13];
    
    _geshuleft.frame =CGRectMake(_left.frame.size.width/4*3+5*Width, _left.frame.size.height/4+10*Width, _left.frame.size.width/4-5*Width,  _left.frame.size.height/4-2.5*Height);
    _geshuleft.text = @"208";
    _geshuleft.alpha = 0.7;
    _geshuleft.font = [UIFont systemFontOfSize:13];
    
    _shanchang.frame = CGRectMake(10*Width, self.frame.size.height/2, 30*Width, _left.frame.size.height/4);
    _shanchang.text = @"擅长:";
    //_shanchang.font = [UIFont systemFontOfSize:13];
    _labelleft.frame = CGRectMake(_left.frame.size.width/4, self.frame.size.height/2, _widthl, _left.frame.size.height/4);
    //_labelleft.text = @"骨盆骨折";
    _labelleft.textAlignment = 1;
    _labelleft.font = [UIFont systemFontOfSize:12];
    _labelleft.textColor = Colorthree;
    _labelleft.layer.borderWidth = 0.5;
    _labelleft.layer.borderColor = [UIColor colorWithRed:253.0f/255.0f green:158.0f/225.0f blue:42.0f/255.0f alpha:1].CGColor;
    
    
    
    
    _right.frame = CGRectMake(self.frame.size.width/2+3*Width, 10*Width, self.frame.size.width/2-13*Width, self.frame.size.height-20*Height);
    _right.layer.borderWidth = 1;
    _right.layer.borderColor = Colorthree.CGColor;
    _right.layer.cornerRadius = 4;
    _imgright.frame = CGRectMake(5*Width, 5*Width, _right.frame.size.width/4-5*Width, _right.frame.size.height/2);
    _imgright.backgroundColor = DEBUG_CLOLR;
    _nameright.frame = CGRectMake(_right.frame.size.width/4+5*Width, 5*Width, _right.frame.size.width/4+10*Width, _right.frame.size.height/4-2.5*Height);
    _nameright.font = [UIFont systemFontOfSize:14];
    _nameright.textAlignment = 0;
    _tuandui2.frame = CGRectMake(_right.frame.size.width/2+12*Width, 5*Width, _right.frame.size.width/2, _right.frame.size.height/4-2.5*Height);
    _tuandui2.text = @"专家团队";
    _tuandui2.font = [UIFont systemFontOfSize:12];
    _tuandui2.alpha = 0.7;
    _tuandui2.textAlignment = 0;
    
    _shuliang2.frame = CGRectMake(_right.frame.size.width/4+5*Width, _right.frame.size.height/4+10*Width, _right.frame.size.width/2, _right.frame.size.height/4-2.5*Height);
    _shuliang2.textAlignment = 0;
    _shuliang2.text = @"对症预约数量:";
    _shuliang2.alpha = 0.7;
    //_shuliang2.font = [UIFont systemFontOfSize:13];
    
    _geshuright.frame =CGRectMake(_right.frame.size.width/4*3+5*Width, _right.frame.size.height/4+10*Width, _right.frame.size.width/4-5*Width,  _right.frame.size.height/4-2.5*Height);
    _geshuright.text = @"7768";
    _geshuright.alpha = 0.7;
    _geshuright.font = [UIFont systemFontOfSize:13];
    
    _shanchang2.frame = CGRectMake(10*Width, self.frame.size.height/2, 30*Width, _right.frame.size.height/4);
    _shanchang2.text = @"擅长:";
    //_shanchang2.font = [UIFont systemFontOfSize:13];
    _labelright.frame = CGRectMake(_right.frame.size.width/4, self.frame.size.height/2, _widthr, _right.frame.size.height/4);
    //_labelright.text = @"肾上腺肿瘤";
    _labelright.textAlignment = 1;
    _labelright.font = [UIFont systemFontOfSize:12];
    _labelright.textColor = Colorthree;
    _labelright.layer.borderWidth = 0.5;
    _labelright.layer.borderColor = [UIColor colorWithRed:253.0f/255.0f green:158.0f/225.0f blue:42.0f/255.0f alpha:1].CGColor;
    
    if (WindowWidth < 375) {
        _shuliang2.font = [UIFont systemFontOfSize:11];
        _shuliang.font = [UIFont systemFontOfSize:11];
        _shanchang2.font = [UIFont systemFontOfSize:11];
        _shanchang.font = [UIFont systemFontOfSize:11];
    }else{
        _shuliang.font = [UIFont systemFontOfSize:13];
        _shuliang2.font = [UIFont systemFontOfSize:13];
        _shanchang.font = [UIFont systemFontOfSize:13];
        _shanchang2.font = [UIFont systemFontOfSize:13];
    }
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
